#ifndef DVADDEDITMAPDIALOG_H
#define DVADDEDITMAPDIALOG_H

#include <QDialog>
#include "dvDatabaseController.h"
#include "dvDatabaseControllerUsable.h"

namespace Ui {
class dvAddEditMapDialog;
}

class dvAddEditMapDialog : public QDialog, public dvDatabaseControllerUsable
{
    Q_OBJECT
    
public:
    explicit dvAddEditMapDialog(QWidget *parent = 0);
    ~dvAddEditMapDialog();

    inline void setMapId(const QVariant& id){ m_mapId = id; }
    void setMapName(const QString& name);
    void setMapFile(const QString& fname);
    void setEditMode(bool edit){ m_edit = edit; }
    
private:
    Ui::dvAddEditMapDialog *ui;
    QVariant m_mapId;
    QString  m_oldName;
    QString  m_oldFile;
    bool m_edit;

private slots:
    void clickedOk();
    void clickedCancel();
    void clickedBrowse();
};

#endif // DVADDEDITMAPDIALOG_H
